<T:ViewBase x:Class="WPFExcelReport.TICC_SPINSPEED"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL"   
                    xmlns:DR="clr-namespace:WPFExcelReport;assembly=TDRAUFTR" 
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    Background="White"  
                    Name="TV"
                    Loaded="Window_Loaded"
     >
    <T:ViewBase.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:TIMES100  x:Key="X100"/>
        <ucd:TIMES10  x:Key="X10"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PreisConverter  x:Key="PreisConverter"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </T:ViewBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.ColumnSpan="2" Margin="0,0,-0.2,0">
            <WrapPanel>
                <DR:TDRAUFTR Name="cDR" Visibility="Collapsed"
                    DocType="LOADEXCEL"  
                             DESTFOLDER="{Binding ART,ElementName=TV}"
                             PREFIX="{Binding VAR,ElementName=TV}"
                             />
                <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=外部导入}}" Click="LoadExcelCommand"></Button>
                <TextBox Text="{Binding ART,ElementName=TV}" Width="200"/>
                <TextBox Text="{Binding VAR,ElementName=TV}" Width="60"/>
            </WrapPanel>
            <WrapPanel >
                <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=下载}}" Click="QueryCommand"></Button>
                <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=新建}}"  Click="NewCommand"></Button>
                <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=保存}}" Click="SaveCommand"></Button>
                <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=复制}}" Click="CopyCommand"></Button>
            </WrapPanel>
        </StackPanel>
        <DataGrid  Grid.Row="1" 
                   CanUserReorderColumns="True"  
                   FontSize="12"
                   HorizontalScrollBarVisibility="Auto"
                   VerticalScrollBarVisibility="Auto"
                   CanUserResizeRows="True" 
                   CanUserSortColumns="True" 
                   AutoGenerateColumns="False" 
                   EnableRowVirtualization="True"  
                   RowDetailsVisibilityMode="VisibleWhenSelected" 
                   HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                   IsSynchronizedWithCurrentItem="True" 
                   Visibility="Visible" 
                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}"    
                   >
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=ROWNID}" Header="{Binding Source={Localization:TranslateExtension Word=ID}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=MTYPE}" Header="{Binding Source={Localization:TranslateExtension Word= 设备}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=YNDES, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:TranslateExtension Word=纱线}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=YN}" Header="{Binding Source={Localization:TranslateExtension Word=纱支}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=MDAILY}" Header="{Binding Source={Localization:TranslateExtension Word=日产量}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=MSPIND}" Header="{Binding Source={Localization:TranslateExtension Word=锭数}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=UMIN}" Header="{Binding Source={Localization:TranslateExtension Word=转数}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=EFF}" Header="{Binding Source={Localization:TranslateExtension Word=效率}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=TPM}" Header="{Binding Source={Localization:TranslateExtension Word=捻度}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GKM}" Header="{Binding Source={Localization:TranslateExtension Word=G/KM}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=RTIME}" Header="{Binding Source={Localization:TranslateExtension Word=粗纱}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=RSPEED}" Header="{Binding Source={Localization:TranslateExtension Word=罗拉}}"  Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</T:ViewBase> 
 
